Skip to content

feat: add configuration getters to RefundVault and ReceiptAnchor (#195) - #261

Merged
wagmiiii merged 3 commits into
accensa:mainfrom
aurorabini:feat/add-config-getters
Aug 29, 2026
Merged

feat: add configuration getters to RefundVault and ReceiptAnchor (#195)#261
wagmiiii merged 3 commits into
accensa:mainfrom
aurorabini:feat/add-config-getters

Conversation

@aurorabini

Copy link
Copy Markdown
Contributor

Configuration Getters

Adds read-only getters for all stored configuration values that were previously
only accessible via raw ledger entry reads.

RefundVault

  • get_admin() → merchant address
  • get_token() → payment token address
  • get_refund_window() → refund window in ledgers
  • is_paused() → whether the vault is paused

ReceiptAnchor

  • get_admin() → merchant address
  • get_pruned_up_to() → pruned-up-to batch ID

All return NotInitialized (rather than trapping) when called on an
uninitialized contract, matching the pattern established in #153.

Closes #195

RefundVault: get_admin, get_token, get_refund_window, is_paused
ReceiptAnchor: get_admin, get_pruned_up_to

All return NotInitialized (rather than trapping) when called on an
uninitialized contract.

Closes accensa#195
@mergekeeper

mergekeeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

Needs changes

The PR implements the requested configuration getters, but misses comprehensive tests and documentation updates required by the linked issues (#153 and #195).

Reviewed commit: 56464072d30e3eb4838e86efe38ad6b370356a6e.

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

The PR implements the configuration getters requested in #195, but omits the changes for #153 (replacing unwrap() calls on instance storage reads across the contracts and adding a partial-state test or reporting the persistent storage audit).

  • contracts/refund-vault/src/lib.rs: Issue #153 requires replacing all instance storage read unwrap() calls with ok_or(Error::NotInitialized)? across the codebase, which has not been fully addressed in this PR alongside issue #195.

Reviewed commit: 5ee408f33219e278c2ef1dd90c5be492a48488ae.

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

The PR implements the requested configuration getters for both contracts and uses proper error handling, but it is missing the required tests and the persistent-storage audit specified by linked issue #153.

  • contracts/refund-vault/src/lib.rs:760: Missing unit or integration tests verifying that getters read back each value correctly after initialize and setters, and return NotInitialized when uninitialized (Issue #153/#195 requirements).

Reviewed commit: a71f5a2c7d21e6537dbe1ee68409710def292698.

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

The PR implements the requested configuration getters, but misses comprehensive tests and documentation updates required by the linked issues (#153 and #195).

  • contracts/refund-vault/src/lib.rs:955: Missing unit/integration tests reading back each config value after initialize and after setters change them, as required by issue #195 acceptance criteria.
  • Review finding: Missing documentation updates in docs/EVENTS.md or README documenting the new getters as the supported way to read config, as required by issue #195 acceptance criteria.

Reviewed commit: 56464072d30e3eb4838e86efe38ad6b370356a6e.

@wagmiiii
wagmiiii merged commit e3b708e into accensa:main Aug 29, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config values are unreadable on-chain: no getter exposes the token, window, admin or pause state

3 participants